﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Entity;

namespace DAO
{
    public class DistrictDAO
    {
        BMS_DatabaseEntities context = new BMS_DatabaseEntities();
        public List<DistrictEntity> LoadDistrict(string ProvinceName)
        {
            var query = from p in context.DISTRICT_INFO
                        where p.PROVINCE_NAME == ProvinceName
                        select new DistrictEntity
                        {
                            DistrictName = p.DISTRICT_NAME,
                        };

            return query.ToList<DistrictEntity>();
        }
    }
}
